exports.install = (app) => {
    app.config.globalProperties.getHashParam = function (name) {
        const w = location.hash.indexOf('?');
        const query = location.hash.substring(w + 1);
        const vars = query.split('&');
        for (let i = 0; i < vars.length; i++) {
          const pair = vars[i].split('=');
          if (pair[0] == name) { return pair[1]; }
        }
        return null;
    },
    app.config.globalProperties.hidePhone = (value) => {
      if(value){
        return value.substring(0,3) + '****' + value.substring(value.length-4)
      }else{
          return '-'
      }
    },
    // 保留后四位
    app.config.globalProperties.lastFour = (value) => {
      if(value){
        return value.substring(value.length - 4,value.length)
      }else{
        return value
      }
    }
}